fix(ci): use $HOME in run step for PATH in release workflow - #27
Merged
Conversation
The LuaRocks CMake build for luv fails on Linux with multiarch Lua installations because $(LUA_LIBDIR) cannot be expanded (luarocks/luarocks#1155, #1257). This is a known ecosystem limitation inherited by Lux. Since the justfile already builds luv and luasystem manually from git source via build-luv and build-system recipes (using direct CMake variables -DLUA_INCLUDE_DIR and -DLUA_LIBRARIES), remove them from lux.toml entirely. This eliminates the redundant and broken lx build --only-deps path while keeping the working manual build. Also remove the now-unnecessary --variables WITH_SHARED_LIBUV=OFF and CFLAGS/MACOSX_DEPLOYMENT_TARGET from ensure-deps and install recipes since those were only needed for the luv CMake build.
The luv CMake build now produces both BUILD_MODULE=ON (luv.so for require() in busted tests) and BUILD_STATIC_LIBS=ON (libluv.a for luastatic binary). test-ci and test-unit recipes depend on build-luv and set LUA_CPATH to find the shared module. .busted config includes cpath fallback. Fixes CI failure: module 'luv' not found on Linux test runs.
The build-luv recipe compiles luv from source via CMake, which requires liblua5.4-dev headers and cmake. The Lux GitHub Action installs the Lux binary but not system-level Lua development packages.
lx test spawns the lua binary to run busted, but only liblua5.4-dev was installed which provides headers/libs, not the interpreter.
The ensure-deps recipe installs luastatic into the Lux-managed tree (~/.lux/5.4/bin) which is not on PATH by default in GitHub Actions.
${{ env.HOME }} resolves to empty string in GitHub Actions env context.
Using export PATH in the run step instead so /Users/tkolleh is expanded by bash.
Checking out the tag causes a race condition: the workflow file from the tag may not have the latest build steps (e.g. Install just was missing in v1.13.1 and v1.13.2 tags). Checkout the default branch instead so the workflow always uses the latest version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
${{ env.HOME }}which resolves to empty) to the run step usingexport PATH="$HOME/.lux/5.4/bin:$PATH"just: command not foundbecause the tag's workflow file didn't have the Install just step (pre-existing for v1.13.1, v1.13.2)Root Cause
${{ env.HOME }}in GitHub Actions env context resolves to an empty string, producing/.lux/5.4/bininstead of/home/runner/.lux/5.4/bin. The Install just step also wasn't present in older release tags.